<template>
    <div>
      <el-card>
        <el-row>
          <el-col>
            基金名称：{{fInfoFullname}}
          </el-col>
          <el-col>
            基金代码：{{fInfoWindcode}}
          </el-col>
          <el-col>
            基金类型：{{fInfoType}}
          </el-col>
          <el-col>
            投资类型：{{fInfoFirstinvesttype}}
          </el-col>
        </el-row>
      </el-card>
      <el-card>
        <el-table :data="tableData" style="width: 100%">
          <el-table-column prop="fNavUnit" label="单位净值" width="180"></el-table-column>
          <el-table-column prop="annDate" label="公告日期" width="180"></el-table-column>
          <el-table-column prop="priceDate" label="截至日期"> </el-table-column>
        </el-table>
      </el-card>
      <el-card>
      </el-card>
    </div>
</template>

<script>
export default{
  name: 'FundDetail',
  data () {
    return {
      fInfoFullname: '',
      fInfoWindcode: '',
      fInfoType: '',
      fInfoFirstinvesttype: '',
      tabledata: []
    }
  },
  mounted: function () {
    this.historyNav()
    this.fundDetail()
  },
  methods: {
    fundDetail () {
      this.$axios
        .post('/fund/chinamutualfund/fundHistoryNav', {'fInfoWindcode': this.fInfoWindcode})
        .then(response => {
          this.fInfoWindcode = response.data.chinamutualFundDescriptionPo.fInfoWindcode
          this.fInfoFullname = response.data.chinamutualFundDescriptionPo.fInfoFullname
          this.fInfoType = response.data.chinamutualFundDescriptionPo.fInfoType
          this.fInfoFirstinvesttype = response.data.chinamutualFundDescriptionPo.fInfoFirstinvesttype
        })
    },
    historyNav () {
      this.$axios
        .post('/fund/chinamutualfund/fundHistoryNav', {'fInfoWindcode': this.fInfoWindcode})
        .then(response => {
          this.tabledata = response.data
        })
    }
  }
}
</script>
<style scoped>

</style>
